package com.retallife.user.controller;


import com.retallife.user.pojo.SportAdvice.SportAdviceVo;
import com.retallife.user.service.SportAdvice.SportAdviceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@Api(tags = "运动建议信息类")
@RequestMapping(method = {RequestMethod.POST, RequestMethod.GET})
public class SportAdviceController {

    @Autowired
    SportAdviceService sportAdviceService;

    @ApiOperation(value = "查询运动建议表中的所有信息")
    @RequestMapping("FindAllSportAdvice")
    public List<SportAdviceVo> FindAllSportAdvice() {
        return sportAdviceService.FindAllSportAdvice();
    }

    @ApiOperation(value = "根据分类查询的运动建议")
    @RequestMapping("FindClassfySportAdvice")
    public List<SportAdviceVo> FindClassfySportAdvice(@RequestParam String sportAdviceClassify) {
        return sportAdviceService.FindClassfySportAdvice(sportAdviceClassify);
    }


}
